llvm-project/clang/lib/Parse
Richard Smith e301ba2b48 Add support for GCC's '__auto_type' extension, per the GCC manual:
https://gcc.gnu.org/onlinedocs/gcc/Typeof.html

Differences from the GCC extension:
 * __auto_type is also permitted in C++ (but only in places where
   it could appear in C), allowing its use in headers that might
   be shared across C and C++, or used from C++98
 * __auto_type can be combined with a declarator, as with C++ auto
   (for instance, "__auto_type *p")
 * multiple variables can be declared in a single __auto_type
   declaration, with the C++ semantics (the deduced type must be
   the same in each case)

This patch also adds a missing restriction on applying typeof to
a bit-field, which GCC has historically rejected in C (due to
lack of clarity as to whether the operand should be promoted).
The same restriction also applies to __auto_type in C (in both
GCC and Clang).

This also fixes PR25449.

Patch by Nicholas Allegra!

llvm-svn: 252690
2015-11-11 02:02:15 +00:00
..
CMakeLists.txt [CMake] Reorder libdeps by alphabetical order. 2014-07-14 04:59:27 +00:00
Makefile
ParseAST.cpp Restore PrettyStackTrace state on crash. 2015-08-07 17:48:57 +00:00
ParseCXXInlineMethods.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
ParseDecl.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
ParseDeclCXX.cpp Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups 2015-10-06 23:40:43 +00:00
ParseExpr.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
ParseExprCXX.cpp N3922: direct-list-initialization of an auto-typed variable no longer deduces a 2015-11-11 01:36:17 +00:00
ParseInit.cpp Silence a -Wunused-variable warning; NFC. 2015-07-07 13:21:26 +00:00
ParseObjc.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
ParseOpenMP.cpp [OPENMP 4.1] Add 'simd' clause for 'ordered' directive. 2015-09-28 06:39:35 +00:00
ParsePragma.cpp Put global classes into the appropriate namespace. 2015-10-28 13:54:16 +00:00
ParseStmt.cpp [coroutines] Creation of promise object, lookup of operator co_await, building 2015-10-27 06:02:45 +00:00
ParseStmtAsm.cpp Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC. 2015-09-15 16:17:27 +00:00
ParseTemplate.cpp Parsing, semantic analysis, and AST for Objective-C type parameters. 2015-07-07 03:57:15 +00:00
ParseTentative.cpp Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
Parser.cpp [OPENMP] Fix for http://llvm.org/PR25221: Infinite loop while parsing OpenMP directive 2015-10-19 06:40:17 +00:00
RAIIObjectsForParser.h Add a new error for unexpected semi-colon before closing delimiter. 2015-05-12 21:36:35 +00:00