]> granicus.if.org Git - clang/commit
Add -f[no-]declspec to control recognition of __declspec as a keyword
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 4 Oct 2015 17:51:05 +0000 (17:51 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 4 Oct 2015 17:51:05 +0000 (17:51 +0000)
commite1cb12fa9b6b63b6a71f67b821f01e588cf79628
tree4ad1a0a6cfa4006c12b57392ac7607215e806526
parent6a948411b24f78177db24b0b06acf2ca202b469d
Add -f[no-]declspec to control recognition of __declspec as a keyword

In versions of clang prior to r238238, __declspec was recognized as a keyword in
all modes.  It was then changed to only be enabled when Microsoft or Borland
extensions were enabled (and for CUDA, as a temporary measure).  There is a
desire to support __declspec in Playstation code, and possibly other
environments.  This commit adds a command-line switch to allow explicit
enabling/disabling of the recognition of __declspec as a keyword.  Recognition
is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and
disabled in all other environments.

Patch by Warren Ristow!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249279 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Basic/TokenKinds.def
include/clang/Driver/Options.td
include/clang/Parse/Parser.h
lib/Basic/IdentifierTable.cpp
lib/Driver/Tools.cpp
lib/Format/Format.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Parse/ParseDecl.cpp
test/Lexer/keywords_test.c
test/Lexer/keywords_test.cpp