[PATCH] D72438: [clang-tidy] For checker `readability-misleading-indentation` update tests.
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 9 03:54:54 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG795c38eb4df6: [clang-tidy] For checker `readability-misleading-indentation` update tests. (authored by Andi-Bogdan Postelnicu <abpostelnicu at me.com>).
Changed prior to commit:
https://reviews.llvm.org/D72438?vs=236971&id=237008#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72438/new/
https://reviews.llvm.org/D72438
Files:
clang-tools-extra/test/clang-tidy/checkers/readability-misleading-indentation.cpp
Index: clang-tools-extra/test/clang-tidy/checkers/readability-misleading-indentation.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/readability-misleading-indentation.cpp
+++ clang-tools-extra/test/clang-tidy/checkers/readability-misleading-indentation.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-misleading-indentation %t
+// RUN: %check_clang_tidy %s readability-misleading-indentation %t -- -- -fno-delayed-template-parsing
void foo1();
void foo2();
@@ -169,6 +169,17 @@
}
template<bool b>
+void mustFailNoInsta() {
+ if constexpr (b) {
+ foo1();
+ }
+ else {
+ foo2();
+ // CHECK-MESSAGES: :[[@LINE-2]]:5: warning: different indentation for 'if' and corresponding 'else' [readability-misleading-indentation]
+ }
+}
+
+template<bool b>
void mustPassNoInsta() {
if constexpr (b) {
foo1();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72438.237008.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200109/1cd32bad/attachment.bin>
More information about the cfe-commits
mailing list