[PATCH] D55853: Ignore ConstantExpr in IgnoreParens

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 26 09:47:21 PST 2018


rnk marked 4 inline comments as done.
rnk added inline comments.


================
Comment at: clang/lib/AST/Expr.cpp:2550
     }
+    if (ConstantExpr *CE = dyn_cast<ConstantExpr>(E)) {
+      E = CE->getSubExpr();
----------------
rsmith wrote:
> Does this pass the tests if you use `FullExpr` here instead? I don't think we should be treating `ConstantExpr` and  other `FullExpr`s differently.
It does not. This is the list of test failures:
********************
Failing Tests (19):
    Clang :: Analysis/cfg-rich-constructors.cpp
    Clang :: Analysis/cfg-rich-constructors.mm
    Clang :: Analysis/copy-elision.cpp
    Clang :: Analysis/dtor.cpp
    Clang :: Analysis/inlining/temp-dtors-path-notes.cpp
    Clang :: Analysis/inner-pointer.cpp
    Clang :: Analysis/malloc-free-after-return.cpp
    Clang :: Analysis/missing-bind-temporary.cpp
    Clang :: Analysis/temp-obj-dtors-cfg-output.cpp
    Clang :: Analysis/temp-obj-dtors-option.cpp
    Clang :: Analysis/temporaries.cpp
    Clang :: Analysis/use-after-move.cpp
    Clang :: CodeGenCXX/condition.cpp
    Clang :: CodeGenCXX/temp-order.cpp
    Clang :: CodeGenObjC/arc.m
    Clang :: SemaCXX/attr-noreturn.cpp
    Clang :: SemaCXX/return-noreturn.cpp
    Clang :: SemaCXX/uninit-variables-conditional.cpp
    Clang :: SemaCXX/warn-consumed-analysis.cpp
I think this shows that there are callers of IgnoreParens looking for an ExprWithCleanups.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55853/new/

https://reviews.llvm.org/D55853





More information about the cfe-commits mailing list