[llvm-branch-commits] [cfe-branch] r353031 - Merging r352307:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 4 01:52:32 PST 2019


Author: hans
Date: Mon Feb  4 01:52:31 2019
New Revision: 353031

URL: http://llvm.org/viewvc/llvm-project?rev=353031&view=rev
Log:
Merging r352307:
------------------------------------------------------------------------
r352307 | void | 2019-01-27 08:24:03 +0100 (Sun, 27 Jan 2019) | 11 lines

Remove Expr sugar decorating the CXXUuidofExpr node.

Summary: Sugar, like ConstantExpr, causes an infinite expansion of the template object.

Reviewers: rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: riccibruno, aaron.ballman, cfe-commits, tzik, rnk

Differential Revision: https://reviews.llvm.org/D57114
------------------------------------------------------------------------

Added:
    cfe/branches/release_80/test/SemaCXX/PR40395.cpp
      - copied unchanged from r352307, cfe/trunk/test/SemaCXX/PR40395.cpp
Modified:
    cfe/branches/release_80/   (props changed)
    cfe/branches/release_80/lib/Sema/SemaTemplate.cpp

Propchange: cfe/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb  4 01:52:31 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352156,352221-352222,352229,352323,352463,352539,352610,352672,352822
+/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352156,352221-352222,352229,352307,352323,352463,352539,352610,352672,352822
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_80/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/lib/Sema/SemaTemplate.cpp?rev=353031&r1=353030&r2=353031&view=diff
==============================================================================
--- cfe/branches/release_80/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/branches/release_80/lib/Sema/SemaTemplate.cpp Mon Feb  4 01:52:31 2019
@@ -6309,7 +6309,7 @@ ExprResult Sema::CheckTemplateArgument(N
       // -- a predefined __func__ variable
       if (auto *E = Value.getLValueBase().dyn_cast<const Expr*>()) {
         if (isa<CXXUuidofExpr>(E)) {
-          Converted = TemplateArgument(ArgResult.get());
+          Converted = TemplateArgument(ArgResult.get()->IgnoreImpCasts());
           break;
         }
         Diag(Arg->getBeginLoc(), diag::err_template_arg_not_decl_ref)




More information about the llvm-branch-commits mailing list