Re: [PATCH] D13099: [Analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods (PR 21606)

Gábor Horváth via cfe-commits cfe-commits at
Thu Sep 24 06:31:39 PDT 2015

xazax.hun added a comment.

A general style comment: you could decrease the level of indentation using early returns. I have one more comment inline, otherwise it looks good to me.

Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:422
@@ +421,3 @@
+  // Check if this is a call to a const method.
+  if (const CXXMethodDecl *D = cast_or_null<CXXMethodDecl>(getDecl())) {
+    if(D->isConst()) {
Does this check work for member operators? I wonder what is the reason that getDecl returns a FunctionDecl instead of CXXMethodDecl.

More information about the cfe-commits mailing list