Add more thorough/correct checking for invalid __thread specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/DeclSpec.cpp b/lib/Parse/DeclSpec.cpp
index 40675de..bcf14d9 100644
--- a/lib/Parse/DeclSpec.cpp
+++ b/lib/Parse/DeclSpec.cpp
@@ -94,6 +94,7 @@
case DeclSpec::SCS_static: return "static";
case DeclSpec::SCS_auto: return "auto";
case DeclSpec::SCS_register: return "register";
+ case DeclSpec::SCS_private_extern: return "__private_extern__";
case DeclSpec::SCS_mutable: return "mutable";
}
}
@@ -345,18 +346,6 @@
TypeSpecComplex = TSC_unspecified;
}
}
-
- // Verify __thread.
- if (SCS_thread_specified) {
- if (StorageClassSpec == SCS_unspecified) {
- StorageClassSpec = SCS_extern; // '__thread int' -> 'extern __thread int'
- } else if (StorageClassSpec != SCS_extern &&
- StorageClassSpec != SCS_static) {
- Diag(D, getStorageClassSpecLoc(), SrcMgr, diag::err_invalid_thread_spec)
- << getSpecifierName((SCS)StorageClassSpec);
- SCS_thread_specified = false;
- }
- }
// Okay, now we can infer the real type.