Don't try to compute the value of a value-dependent expression when
checking trivial comparisons. Fixes PR8795.
llvm-svn: 122322
diff --git a/clang/test/SemaTemplate/dependent-expr.cpp b/clang/test/SemaTemplate/dependent-expr.cpp
index f26c85b1..a1ddd24 100644
--- a/clang/test/SemaTemplate/dependent-expr.cpp
+++ b/clang/test/SemaTemplate/dependent-expr.cpp
@@ -61,3 +61,13 @@
}
};
}
+
+namespace PR8795 {
+ template <class _CharT> int test(_CharT t)
+ {
+ int data [] = {
+ sizeof(_CharT) > sizeof(char)
+ };
+ return data[0];
+ }
+}