[PATCH] D55853: Ignore ConstantExpr in IgnoreParens
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 26 09:48:16 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350068: Ignore ConstantExpr in IgnoreParens (authored by rnk, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D55853?vs=178960&id=179515#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55853/new/
https://reviews.llvm.org/D55853
Files:
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/test/CodeGenCXX/mangle-ms-templates.cpp
Index: cfe/trunk/test/CodeGenCXX/mangle-ms-templates.cpp
===================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-templates.cpp
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -std=c++11 -fms-compatibility-version=19 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
// RUN: %clang_cc1 -std=c++11 -fms-compatibility-version=19 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
+// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
template<typename T>
class Class {
Index: cfe/trunk/lib/AST/Expr.cpp
===================================================================
--- cfe/trunk/lib/AST/Expr.cpp
+++ cfe/trunk/lib/AST/Expr.cpp
@@ -2596,6 +2596,10 @@
continue;
}
}
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(E)) {
+ E = CE->getSubExpr();
+ continue;
+ }
return E;
}
}
@@ -2718,10 +2722,6 @@
E = NTTP->getReplacement();
continue;
}
- if (ConstantExpr *CE = dyn_cast<ConstantExpr>(E)) {
- E = CE->getSubExpr();
- continue;
- }
return E;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55853.179515.patch
Type: text/x-patch
Size: 1538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181226/8bd522d8/attachment.bin>
More information about the cfe-commits
mailing list