[all-commits] [llvm/llvm-project] f9c462: [clang-tidy] Disable Checks on If constexpr statem...
Nathan James via All-commits
all-commits at lists.llvm.org
Fri Jan 17 06:21:44 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f9c46229e4ac29053747c96e08c574c6c48d544b
https://github.com/llvm/llvm-project/commit/f9c46229e4ac29053747c96e08c574c6c48d544b
Author: Nathan <n.james93 at hotmail.co.uk>
Date: 2020-01-17 (Fri, 17 Jan 2020)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
M clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
A clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone-if-constexpr-template.cpp
A clang-tools-extra/test/clang-tidy/checkers/readability-braces-around-statements-constexpr-if-templates.cpp
Log Message:
-----------
[clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements
Summary: fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32203 | readability-braces-around-statements broken for if constexpr]] and [[ https://bugs.llvm.org/show_bug.cgi?id=44229 | bugprone-branch-clone false positive with template functions and constexpr ]] by disabling the relevant checks on if constexpr statements while inside an instantiated template. This is due to how the else branch of an if constexpr statement is folded away to a null statement if the condition evaluates to false
Reviewers: alexfh, hokein, aaron.ballman, xazax.hun
Reviewed By: aaron.ballman, xazax.hun
Subscribers: rnkovacs, JonasToth, Jim, lebedev.ri, xazax.hun, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D71980
More information about the All-commits
mailing list