In C, we don't get a evaluateAsInitializer() call for all global declarations, yet we have to handle DeclRefExpr pointing to them.
Details
Details
Diff Detail
Diff Detail
Event Timeline
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
2172–2173 | Do we want to assert/limit this functionality to C instead of doing it in both C and C++? | |
clang/test/AST/Interp/c.c | ||
15–16 | Pedantically, this is also not a constant expression. Probably worth adding -pedantic to the RUN lines to ensure we properly warn with both constexpr engines. |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
2172–2173 | I never know how to do something for just C. I know there's stuff in LangOpts for C++, but no LangOpts::C? |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
2172–2173 | !LangOpts.CPlusPlus afaik |
Do we want to assert/limit this functionality to C instead of doing it in both C and C++?