aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2020-10-31 13:07:06 +0100
committerMark de Wever <koraq@xs4all.nl>2020-10-31 17:51:36 +0100
commitb231396122f131ffaff5fc4ba36685a7df554aaa (patch)
tree89d6ff8095939b84590667d49a20ce4fa366eb91 /llvm/lib/Analysis/ValueTracking.cpp
parentb46fddf75fc27ee1545f00ab853d50b10c1d7ee6 (diff)
downloadllvm-b231396122f131ffaff5fc4ba36685a7df554aaa.zip
llvm-b231396122f131ffaff5fc4ba36685a7df554aaa.tar.gz
llvm-b231396122f131ffaff5fc4ba36685a7df554aaa.tar.bz2
[Sema] Diagnose annotating `if constexpr` with a likelihood attribute
Adds a diagnostic when the user annotates an `if constexpr` with a likelihood attribute. The `if constexpr` statement is evaluated at compile time so the attribute has no effect. Annotating the accompanied `else` with a likelihood attribute has the same effect as annotating a generic statement. Since the attribute there is most likely not intended, a diagnostic will be issued. Since the attributes can't conflict, the "conflict" won't be diagnosed for an `if constexpr`. Differential Revision: https://reviews.llvm.org/D90336
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions