Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Unified Diff: test/Analysis/misc-ps-region-store.cpp

Issue 2716044: Fix Clang PR 8426, 8427, and 8433 Base URL: https://llvm.org/svn/llvm-project/cfe/trunk/
Patch Set: make Clang static analyzer skip function templates Created 14 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Checker/AnalysisConsumer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Analysis/misc-ps-region-store.cpp
===================================================================
--- test/Analysis/misc-ps-region-store.cpp (revision 117724)
+++ test/Analysis/misc-ps-region-store.cpp (working copy)
@@ -159,3 +159,50 @@
for (; ; x++) { }
}
+// PR8426 -- this used to crash.
+
+void Use(void* to);
+
+template <class T> class Foo {
+ ~Foo();
+ struct Bar;
+ Bar* bar_;
+};
+
+template <class T> Foo<T>::~Foo() {
+ Use(bar_);
+ T::DoSomething();
+ bar_->Work();
+}
+
+// PR8427 -- this used to crash.
+
+class Dummy {};
+
+bool operator==(Dummy, int);
+
+template <typename T>
+class Foo2 {
+ bool Bar();
+};
+
+template <typename T>
+bool Foo2<T>::Bar() {
+ return 0 == T();
+}
+
+// PR8433 -- this used to crash.
+
+template <typename T>
+class Foo3 {
+ public:
+ void Bar();
+ void Baz();
+ T value_;
+};
+
+template <typename T>
+void Foo3<T>::Bar() {
+ Baz();
+ value_();
+}
« no previous file with comments | « lib/Checker/AnalysisConsumer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b