================
@@ -466,6 +584,38 @@ inline T Foo<T>::bar(const T& t, const U& u) { return {}; }
   }
 }
 
+TEST_F(DefineOutlineTest, DeclspecAttributes) {
+  FileName = "Test.hpp";
+  ExtraFiles["Test.cpp"] = "";
+  ExtraArgs.push_back("-fdeclspec");
+
+  struct {
+    llvm::StringRef Test;
+    llvm::StringRef ExpectedHeader;
+    llvm::StringRef ExpectedSource;
+  } Cases[] = {
+      {
+          R"cpp(
+            struct A {
+              __declspec(noinline) int ^foo() { return 0; }
+            };
+)cpp",
+          R"cpp(
+            struct A {
+              __declspec(noinline) int foo() ;
+            };
+)cpp",
+          "int A::foo() { return 0; }\n"},
+  };
+  llvm::StringMap<std::string> EditedFiles;
+  for (auto &Case : Cases) {
+    apply(Case.Test, &EditedFiles);
----------------
max-winkler wrote:

Correct. I fixed this.

https://github.com/llvm/llvm-project/pull/242635
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to