[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 12 04:58:27 PDT 2018


Szelethus added a comment.

Also needs an entry to `www/analyzer/alpha_checks.html`.



================
Comment at: test/Analysis/enum-cast-out-of-range.cpp:1
+// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=alpha.cplusplus.EnumCastOutOfRange -verify %s
+
----------------
1. Prefer `%clang_analyze_cc1`
2. Always run core checkers too. `-analyzer-checker=core,alpha.cplusplus.EnumCastOutOfRange`
3. Organize the run line to fit into 80 cols (if possible)
```
// RUN: %clang_analyze_cc1 \
// RUN:   -analyzer-checker=core,alpha.cplusplus.EnumCastOutOfRange \
// RUN:   -std=c++11 -verify %s


https://reviews.llvm.org/D33672





More information about the cfe-commits mailing list