summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2019-08-26 19:44:07 +0000
committerAaron Ballman <aaron@aaronballman.com>2019-08-26 19:44:07 +0000
commit1f2de81a89f2266dc8b996b211041f5d1909e46e (patch)
tree433b1252c27ce50df4da68819bcdc5ffa46080ba /lib/Parse/ParseDecl.cpp
parent912b005b3b8643d39e685746ab3c57b3e191d443 (diff)
downloadclang-1f2de81a89f2266dc8b996b211041f5d1909e46e.tar.gz
Diagnose use of _Thread_local as an extension when not in C11 mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 3de52ce875..1375409a75 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -3574,6 +3574,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
isStorageClass = true;
break;
case tok::kw__Thread_local:
+ if (!getLangOpts().C11)
+ Diag(Tok, diag::ext_c11_feature) << Tok.getName();
isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS__Thread_local,
Loc, PrevSpec, DiagID);
isStorageClass = true;
@@ -3631,7 +3633,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
// alignment-specifier
case tok::kw__Alignas:
if (!getLangOpts().C11)
- Diag(Tok, diag::ext_c11_alignment) << Tok.getName();
+ Diag(Tok, diag::ext_c11_feature) << Tok.getName();
ParseAlignmentSpecifier(DS.getAttributes());
continue;