We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8178d3c commit 8717629Copy full SHA for 8717629
clang/lib/Sema/SemaDecl.cpp
@@ -14481,7 +14481,8 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {
14481
// do this lazily, because the result might depend on things that change
14482
// later, such as which constexpr functions happen to be defined.
14483
SmallVector<PartialDiagnosticAt, 8> Notes;
14484
- if (!getLangOpts().CPlusPlus11 && !getLangOpts().C23) {
+ if (getLangOpts().CPlusPlus && !getLangOpts().CPlusPlus11 &&
14485
+ !getLangOpts().C23) {
14486
// Prior to C++11, in contexts where a constant initializer is required,
14487
// the set of valid constant initializers is described by syntactic rules
14488
// in [expr.const]p2-6.
0 commit comments