[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 2 04:45:37 PDT 2020
steakhal marked 2 inline comments as done.
steakhal added inline comments.
================
Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:1
+// RUN: %clang_analyze_cc1 --std=c++17 -analyzer-checker=core,debug.ExprInspection -verify %s
+
----------------
Szelethus wrote:
> Isn't it `-std=c++17`?
Thanks, typo.
================
Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21
+ clang_analyzer_dump(__func__);
+ clang_analyzer_dump(__FUNCTION__);
+ clang_analyzer_dump(__PRETTY_FUNCTION__);
+ // expected-warning at -3 {{&Element{"func",0 S64b,char}}}
+ // expected-warning at -3 {{&Element{"func",0 S64b,char}}}
+ // expected-warning at -3 {{&Element{"void func(U) [T = Class, Value = 42, U = char]",0 S64b,char}}}
+}
----------------
Szelethus wrote:
> Why not put the expected warning right below the function call?
That would seriously violate the column limit.
This way it is easier to see and validate the pattern IMO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87004/new/
https://reviews.llvm.org/D87004
More information about the cfe-commits
mailing list