hanchenye-llvm-project/clang/lib/Parse
Aaron Ballman bc7cc2074b Fix an accepts-invalid issue with [[]] attributes in the type position in C
A user reported an issue to me via email that Clang was accepting some
code that GCC was rejecting. After investigation, it turned out to be a
general problem of us failing to properly reject attributes written in
the type position in C when they don't apply to types. The root cause
was a terminology issue -- we sometimes use "CXX11Attr" to mean [[]] in
C++11 mode and sometimes [[]] in general -- and this came back to bite
us because in this particular case, it really meant [[]] in C++ mode.

I fixed the issue by introducing a new function
AttributeCommonInfo::isStandardAttributeSyntax() to represent [[]] in
either C or C++ mode.

This fix pointed out that we've had the issue in some of our existing
tests, which have all been corrected. This resolves
https://bugs.llvm.org/show_bug.cgi?id=50954.
2021-07-01 12:41:18 -04:00
..
CMakeLists.txt
ParseAST.cpp
ParseCXXInlineMethods.cpp
ParseDecl.cpp [clang][Parse] Add parsing support for C++ attributes on using-declarations 2021-06-01 08:47:50 -04:00
ParseDeclCXX.cpp [clang] p1099 using enum part 2 2021-06-08 11:11:46 -07:00
ParseExpr.cpp Reimplement __builtin_unique_stable_name- 2021-05-27 07:12:20 -07:00
ParseExprCXX.cpp Handle interactions between reserved identifier and user-defined suffixes 2021-06-23 15:38:42 +02:00
ParseInit.cpp
ParseObjc.cpp
ParseOpenMP.cpp [OpenMP] Fix C-only clang assert on parsing use_allocator clause of target directive 2021-06-14 10:36:27 -07:00
ParsePragma.cpp [OpenCL] Drop pragma handling for extension types/decls. 2021-05-17 12:09:43 +01:00
ParseStmt.cpp [clang][parser] Unify rejecting (non) decl stmts with gnu attributes 2021-04-19 12:43:55 +02:00
ParseStmtAsm.cpp [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
ParseTemplate.cpp
ParseTentative.cpp [clang] Fix ternary operator in the second for loop statement 2021-05-16 10:42:52 -07:00
Parser.cpp Fix an accepts-invalid issue with [[]] attributes in the type position in C 2021-07-01 12:41:18 -04:00