[Analyzer] Fix buildbot failure caused by commit `rG813734dad7e8b526c39806d1a88820b1f...
authorAdam Balogh <adam.balogh@ericsson.com>
Wed, 20 May 2020 12:58:37 +0000 (14:58 +0200)
committerAdam Balogh <adam.balogh@ericsson.com>
Tue, 9 Jun 2020 12:50:27 +0000 (14:50 +0200)
clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp

index 7532d54..a329b37 100644 (file)
@@ -26,7 +26,9 @@ public:
     // We are checking the invocation of `returnC` which returns an object
     // by value.
     const IdentifierInfo *ID = Call.getCalleeIdentifier();
-    if (ID->getName() != "returnC")
+    // Only calls with origin expression are checked. These are `returnC()`
+    // and C::C().
+    if (!Call.getOriginExpr())
       return;
 
     // Since `returnC` returns an object by value, the invocation results