summaryrefslogtreecommitdiff
path: root/test/Frontend
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-09-19 17:59:40 +0000
committerAdam Nemet <anemet@apple.com>2017-09-19 17:59:40 +0000
commita576fcd7404a955d444fd768b57bf1caff5fb955 (patch)
tree77d6d673be7615bc16a3866b30004575b5c1e9d5 /test/Frontend
parent9411957410813aeefc1bb299abcb856ce1ef8aae (diff)
Fix ClangDiagnosticHandler::is*RemarkEnabled members
Apparently these weren't really working. I added test coverage and fixed the typo in the name and the parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Frontend')
-rw-r--r--test/Frontend/optimization-remark-extra-analysis.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Frontend/optimization-remark-extra-analysis.c b/test/Frontend/optimization-remark-extra-analysis.c
new file mode 100644
index 0000000000..1a8415e69c
--- /dev/null
+++ b/test/Frontend/optimization-remark-extra-analysis.c
@@ -0,0 +1,11 @@
+// Test that the is*RemarkEnabled overrides are working properly. This remark
+// requiring extra analysis is only conditionally enabled.
+
+// RUN: %clang_cc1 %s -Rpass-missed=gvn -O2 -emit-llvm-only -verify
+
+int foo(int *x, int *y) {
+ int a = *x;
+ *y = 2;
+ // expected-remark@+1 {{load of type i32 not eliminated}}
+ return a + *x;
+}