From 3baecdc25147b80e37d07eb72d0e8beae72b601a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 11 Jun 2019 17:50:32 +0000 Subject: For DR712: store on a DeclRefExpr whether it constitutes an odr-use. Begin restructuring to support the forms of non-odr-use reference permitted by DR712. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363086 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sema/SemaDecl.cpp') diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 6bd7b4e071..10837f6894 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -11994,7 +11994,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { for (unsigned I = 0, N = Notes.size(); I != N; ++I) Diag(Notes[I].first, Notes[I].second); } - } else if (var->isUsableInConstantExpressions(Context)) { + } else if (var->mightBeUsableInConstantExpressions(Context)) { // Check whether the initializer of a const variable of integral or // enumeration type is an ICE now, since we can't tell whether it was // initialized by a constant expression if we check later. -- cgit v1.2.1