[PATCH] D77809: [Analyzer] Include typedef statements in CFG build.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 00:30:10 PDT 2020
balazske marked an inline comment as done.
balazske added inline comments.
================
Comment at: clang/test/Analysis/cfg.cpp:570
}
+// CHECK-LABEL: void vla_simple(int x)
----------------
aaron.ballman wrote:
> Can you also add tests for:
> ```
> int vla_unevaluated(int x) {
> // Evaluates the ++x
> sizeof(int[++x]);
> // Does not evaluate the ++x
> _Alignof(int[++x]);
> _Generic((int(*)[++x])0, default : 0);
>
> return x;
> }
> ```
>
> Also, it's a bit strange to find these VLA tests in a .cpp file. VLAs are a C++ extension and we should have some testing for them for constructs that are C++-specific, but I would have expected many of these tests to be in a C file instead.
Could be there platforms (on buildbot?) where the VLA code (in cpp file) does not compile? Is it worth to have a test with VLA type alias then?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77809/new/
https://reviews.llvm.org/D77809
More information about the cfe-commits
mailing list