llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Anutosh Bhat (anutosh491)

<details>
<summary>Changes</summary>

Fixes #<!-- -->164596

---
Full diff: https://github.com/llvm/llvm-project/pull/164597.diff


1 Files Affected:

- (modified) clang/lib/Sema/Sema.cpp (+4) 


``````````diff
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 215ac184a5337..15c5815398094 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1447,6 +1447,10 @@ void Sema::ActOnEndOfTranslationUnit() {
     if (!VD || VD->isInvalidDecl() || !Seen.insert(VD).second)
       continue;
 
+    if (PP.isIncrementalProcessingEnabled() &&
+        VD->getTranslationUnitDecl() != Context.getTranslationUnitDecl())
+      continue;
+
     if (const IncompleteArrayType *ArrayT
         = Context.getAsIncompleteArrayType(VD->getType())) {
       // Set the length of the array to 1 (C99 6.9.2p5).

``````````

</details>


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

Reply via email to