diff options
author | James Y Knight <jyknight@google.com> | 2021-01-24 15:50:15 -0500 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2021-01-27 16:46:52 -0500 |
commit | 8ca33605ff0cfc536f5c6710fb5f6378bf11959a (patch) | |
tree | 5d166ca892b12b5ccdf1e7912d186d95be11f344 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 9c7aeaebb3ac1b94200b59b111742cb6b8f090c2 (diff) | |
download | llvm-8ca33605ff0cfc536f5c6710fb5f6378bf11959a.zip llvm-8ca33605ff0cfc536f5c6710fb5f6378bf11959a.tar.gz llvm-8ca33605ff0cfc536f5c6710fb5f6378bf11959a.tar.bz2 |
Itanium Mangling: Fix handling of <expr-primary> in <template-arg>.
Previously, we were emitting an extraneous X .. E in <template-arg>
around an <expr-primary> if the template argument was constructed from
an expression (rather than an already-evaluated literal value). In
such a case, we would then e.g. emit 'XLi0EE' instead of 'Li0E'.
We had one special-case for DeclRefExpr expressions, in particular, to
omit them the mangled-name without the surrounding X/E. However,
unfortunately, that special case also triggered for ParmVarDecl (a
subtype of VarDecl), and _incorrectly_ emitted 'L_Z .. E' instead of
the proper 'Xfp_E'.
This change causes mangleExpression itself to be responsible for
emitting X/E around non-primary expressions, which removes the
special-case, and corrects both these problems.
Differential Revision: https://reviews.llvm.org/D95487
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions