forked from qt-creator/qt-creator
		
	Remove a bunch of on-top patches that are already part of llvm/clang 5. Rebase the remaining ones and add backported ones. Add also a README providing more information about the patches. Task-number: QTCREATORBUG-18824 Task-number: QTCREATORBUG-17769 Change-Id: I9f6904b2e6d7c83de175e7b8c194e1a494cd2571 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
diff --git a/tools/clang/lib/Sema/SemaCodeComplete.cpp b/tools/clang/lib/Sema/SemaCodeComplete.cpp
 | 
						|
index 4de7d42207..7001849426 100644
 | 
						|
--- a/tools/clang/lib/Sema/SemaCodeComplete.cpp
 | 
						|
+++ b/tools/clang/lib/Sema/SemaCodeComplete.cpp
 | 
						|
@@ -4286,9 +4286,12 @@ static void mergeCandidatesWithResults(Sema &SemaRef,
 | 
						|
         });
 | 
						|
 
 | 
						|
     // Add the remaining viable overload candidates as code-completion results.
 | 
						|
-    for (auto &Candidate : CandidateSet)
 | 
						|
+    for (auto &Candidate : CandidateSet) {
 | 
						|
+      if (Candidate.Function && Candidate.Function->isDeleted())
 | 
						|
+        continue;
 | 
						|
       if (Candidate.Viable)
 | 
						|
         Results.push_back(ResultCandidate(Candidate.Function));
 | 
						|
+    }
 | 
						|
   }
 | 
						|
 }
 | 
						|
 
 | 
						|
diff --git a/tools/clang/test/Index/complete-constructor-params.cpp b/tools/clang/test/Index/complete-constructor-params.cpp
 | 
						|
index 6685626a58..949077a214 100644
 | 
						|
--- a/tools/clang/test/Index/complete-constructor-params.cpp
 | 
						|
+++ b/tools/clang/test/Index/complete-constructor-params.cpp
 | 
						|
@@ -18,6 +18,20 @@ int main() {
 | 
						|
   int(42);
 | 
						|
 }
 | 
						|
 
 | 
						|
+struct Foo {
 | 
						|
+    Foo() = default;
 | 
						|
+    Foo(const Foo&) = delete;
 | 
						|
+};
 | 
						|
+
 | 
						|
+struct Bar {
 | 
						|
+    Foo f;
 | 
						|
+};
 | 
						|
+
 | 
						|
+void function() {
 | 
						|
+    Bar b1;
 | 
						|
+    Bar b2(b1);
 | 
						|
+}
 | 
						|
+
 | 
						|
 // RUN: c-index-test -code-completion-at=%s:11:10 %s | FileCheck -check-prefix=CHECK-CC1 %s
 | 
						|
 // CHECK-CC1: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S<int> &}{RightParen )} (1)
 | 
						|
 // CHECK-CC1: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Placeholder U}{Comma , }{Placeholder U}{RightParen )} (1)
 | 
						|
@@ -138,3 +152,6 @@ int main() {
 | 
						|
 // CHECK-CC10-NEXT: Class name
 | 
						|
 // CHECK-CC10-NEXT: Nested name specifier
 | 
						|
 // CHECK-CC10-NEXT: Objective-C interface
 | 
						|
+
 | 
						|
+// RUN: c-index-test -code-completion-at=%s:32:12 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC11 %s
 | 
						|
+// CHECK-CC11-NOT: OverloadCandidate:{Text Bar}{LeftParen (}{CurrentParameter const Bar &}{RightParen )} (1)
 |