llvm-project/clang/lib
Mark de Wever b231396122 [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
2020-10-31 17:51:36 +01:00
..
ARCMigrate [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
AST [CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop. 2020-10-31 17:51:29 +01:00
ASTMatchers [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs 2020-10-11 18:52:38 +03:00
Analysis Thread safety analysis: Consider static class members as inaccessible 2020-10-30 00:35:14 +01:00
Basic [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
CodeGen [CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop. 2020-10-31 17:51:29 +01:00
CrossTU [analyzer] Add CTUImportCppThreshold for C++ files 2020-07-09 15:36:33 +02:00
DirectoryWatcher Revert "DirectoryWatcher: add an implementation for Windows" 2020-10-13 12:35:22 -07:00
Driver [clang][driver] Rename DriverOption as NoXarchOption (NFC) 2020-10-30 17:00:06 +00:00
Edit [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
Format [clang-format] Fix misformatted macro definitions after D86959 2020-10-27 12:16:46 +00:00
Frontend [ThinLTO] Fix empty .llvmcmd sections 2020-10-29 09:57:42 -07:00
FrontendTool [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
Headers [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
Index [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
IndexSerialization [index-while-building] Fix build with -DBUILD_SHARED_LIBS=True 2020-08-20 15:12:56 +01:00
Lex HeaderSearch: Simplify use of FileEntryRef in HeaderSearch::LookupFile, NFC 2020-10-23 22:10:50 -04:00
Parse Add option 'exceptions' to pragma clang fp 2020-10-31 17:36:12 +07:00
Rewrite SourceManager: Clarify that FileInfo always has a ContentCache, NFC 2020-10-23 12:38:53 -04:00
Sema [Sema] Diagnose annotating `if constexpr` with a likelihood attribute 2020-10-31 17:51:36 +01:00
Serialization ModuleManager: Simplify lookupModuleFile by only setting the out parameter once, NFC 2020-10-28 19:04:22 -04:00
StaticAnalyzer [MallocChecker] Remove duplicate QCoreApplication::postEvent check. NFCI. 2020-10-27 13:14:54 +00:00
Testing Fix MSVC "not all control paths return a value" warning. NFC. 2020-06-05 10:45:59 +01:00
Tooling [Syntax] Add iterators over children of syntax trees. 2020-10-28 12:37:57 +01:00
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00