llvm-project/clang-tools-extra/clang-tidy
Matthias Gehre 03fadabe47 cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode
Summary:
When the expression is value dependent,
isIntegerConstantExpr() crashes in C++03 mode with
 ../tools/clang/lib/AST/ExprConstant.cpp:9330: (anonymous namespace)::ICEDiag CheckICE(const clang::Expr *, const clang::ASTContext &):
  Assertion `!E->isValueDependent() && "Should not see value dependent exprs!"' failed.
In C++11 mode, that assert does not trigger.

This commit works around this in the check. We don't check
value-dependent indices and instead check their specialization.

Reviewers: alexfh, aaron.ballman

Subscribers: nemanjai, cfe-commits

Differential Revision: http://reviews.llvm.org/D22190

llvm-svn: 275461
2016-07-14 20:00:48 +00:00
..
boost [clang-tidy] boost-use-to-string arg expr location bugfix 2016-06-28 08:16:20 +00:00
cert [ASTMatchers] Added ignoringParenImpCasts to has matchers 2016-05-31 15:26:56 +00:00
cppcoreguidelines cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode 2016-07-14 20:00:48 +00:00
google Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
llvm Fix clang-tidy patterns to adapt to newly added ExprWithCleanups nodes. 2016-06-21 20:11:20 +00:00
misc [clang-tidy] Fix misc-definitions-in-headers misplaced fixing to fully templated function. 2016-07-13 13:55:29 +00:00
modernize [clang-tidy] Add modernize-use-using 2016-06-25 18:37:53 +00:00
performance [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods 2016-07-05 14:40:44 +00:00
plugin Add boost-use-to-string 2016-04-29 17:58:29 +00:00
readability clang-tidy/readability-identifier-naming: crash on DependentTemplateSpecializationType 2016-07-09 20:09:28 +00:00
tool [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. 2016-07-11 07:47:04 +00:00
utils [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00
CMakeLists.txt Add boost-use-to-string 2016-04-29 17:58:29 +00:00
ClangTidy.cpp Fix include path in ClangTidy.cpp. 2016-04-28 01:42:12 +00:00
ClangTidy.h [clang-tidy] Fix doxygen errors. NFC. 2016-06-17 11:43:33 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyModule.cpp Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
ClangTidyModule.h Revert "Apply modernize-use-default to clang-tools-extra." 2015-10-20 21:45:52 +00:00
ClangTidyModuleRegistry.h [clang-tidy] Fixed header guards using clang-tidy llvm-header-guard check. NFC. 2015-03-09 16:52:33 +00:00
ClangTidyOptions.cpp [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. 2016-07-11 07:47:04 +00:00
ClangTidyOptions.h [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from. 2016-04-27 09:15:01 +00:00
add_new_check.py [clang-tidy] Remove redundant quote in add_new_check script 2016-05-30 15:42:08 +00:00
rename_check.py [clang-tidy] Python script for easy check rename 2015-10-11 07:58:34 +00:00