llvm-project/clang/lib/Parse
Jun Zhang 8a4d388c7f
[Clang][Sema] Prohibit statement expression in the default argument
As statement expression makes no sense in the default argument,
this patch tries to disable it in the all cases.

Please note that the statement expression is a GNU extension, which
means that Clang should be consistent with GCC. However, there's no
response from GCC devs since we have raised the issue for several weeks.
In this case, I think we can disallow statement expressions as a default
parameter in general for now, and relax the restriction if GCC folks
decide to retain the feature for functions but not lambdas in the
future.

Related discussion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104765

Fixes https://github.com/llvm/llvm-project/issues/53488

Differential Revision: https://reviews.llvm.org/D119609
2022-04-06 09:28:20 +08:00
..
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
ParseAST.cpp Properly diagnose constant evaluation issues at TU scope 2022-03-08 10:19:15 -05:00
ParseCXXInlineMethods.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
ParseDecl.cpp [Clang][Sema] Prohibit statement expression in the default argument 2022-04-06 09:28:20 +08:00
ParseDeclCXX.cpp Expanding HLSL attribute diagnostics 2022-03-30 14:15:01 -05:00
ParseExpr.cpp [Clang] Implement __builtin_source_location. 2022-03-28 18:29:02 -04:00
ParseExprCXX.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
ParseInit.cpp [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
ParseObjc.cpp [modules] Merge ObjC interface ivars with anonymous types. 2022-04-04 18:48:30 -07:00
ParseOpenMP.cpp [OpenMP] Initial parsing/sema for the 'omp target parallel loop' construct 2022-03-24 09:19:00 -07:00
ParsePragma.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
ParseStmt.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
ParseStmtAsm.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00
ParseTemplate.cpp [Clang][Sema] Prohibit statement expression in the default argument 2022-04-06 09:28:20 +08:00
ParseTentative.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
Parser.cpp [C++20][Modules][HU 1/5] Introduce header units as a module type. 2022-03-25 09:17:14 +00:00