aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-12-16 13:51:56 -0800
committerRichard Smith <richard@metafoo.co.uk>2020-12-17 23:54:37 -0800
commit8c1f2d15b826591cdf6bd6b468b8a7d23377b29e (patch)
tree5b45af3abaabdf33a9a59e7397154542f147b9cc /clang/lib/Frontend/CompilerInvocation.cpp
parent477b6505fa1d49339c81fbbda937dc8bb5e53cfd (diff)
downloadllvm-8c1f2d15b826591cdf6bd6b468b8a7d23377b29e.zip
llvm-8c1f2d15b826591cdf6bd6b468b8a7d23377b29e.tar.gz
llvm-8c1f2d15b826591cdf6bd6b468b8a7d23377b29e.tar.bz2
Following up on PR48517, fix handling of template arguments that refer
to dependent declarations. Treat an id-expression that names a local variable in a templated function as being instantiation-dependent. This addresses a language defect whereby a reference to a dependent declaration can be formed without any construct being value-dependent. Fixing that through value-dependence turns out to be problematic, so instead this patch takes the approach (proposed on the core reflector) of allowing the use of pointers or references to (but not values of) dependent declarations inside value-dependent expressions, and instead treating template arguments as dependent if they evaluate to a constant involving such dependent declarations. This ends up affecting a bunch of OpenMP tests, due to OpenMP imprecisely handling instantiation-dependent constructs, bailing out early instead of processing dependent constructs to the extent possible when handling the template.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions