mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 12:39:19 +00:00
Always rebuild a DeclRefExpr if its FoundDecl would change.
Fixes a regression introduced by r369999. llvm-svn: 373022
This commit is contained in:
parent
c898724974
commit
bf322b7cdd
@ -9219,6 +9219,7 @@ TreeTransform<Derived>::TransformDeclRefExpr(DeclRefExpr *E) {
|
||||
if (!getDerived().AlwaysRebuild() &&
|
||||
QualifierLoc == E->getQualifierLoc() &&
|
||||
ND == E->getDecl() &&
|
||||
Found == E->getFoundDecl() &&
|
||||
NameInfo.getName() == E->getDecl()->getDeclName() &&
|
||||
!E->hasExplicitTemplateArgs()) {
|
||||
|
||||
|
16
clang/test/SemaTemplate/using-decl.cpp
Normal file
16
clang/test/SemaTemplate/using-decl.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
// RUN: %clang_cc1 -std=c++2a -verify %s
|
||||
// expected-no-diagnostics
|
||||
|
||||
namespace UsingInGenericLambda {
|
||||
namespace a {
|
||||
enum { b };
|
||||
}
|
||||
template<typename> void c() {
|
||||
auto d = [](auto) {
|
||||
using a::b;
|
||||
(void)b;
|
||||
};
|
||||
d(0);
|
||||
}
|
||||
void e() { c<int>(); }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user