LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 14181 - Diagnostics not restored when temporarily disabled from within PCH
Summary: Diagnostics not restored when temporarily disabled from within PCH
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 14:33 PDT by Matthias Kleine
Modified: 2012-10-29 19:27 PDT (History)
6 users (show)

See Also:
Fixed By Commit(s):


Attachments
Testcase for the bug (956 bytes, application/octet-stream)
2012-10-25 14:33 PDT, Matthias Kleine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Kleine 2012-10-25 14:33:32 PDT
Created attachment 9418 [details]
Testcase for the bug

Diagnostics that are temporarily disabled (using "#pragma clang diagnostic push/pop") from within precompiled headers are not re-enabled in the including file. Find attached a patch that extends the existing PCH-diagnostics-test to also test for this.
Comment 1 Aaron Wishnick 2012-10-26 10:03:46 PDT
This is affecting my company as well. We include some third-party code in our precompiled headers, and we disable warnings around it. When we do this, we no longer see warnings in any of our code. This is with the version of clang from Xcode 4.5.1:

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
Comment 2 Douglas Gregor 2012-10-26 10:10:16 PDT
cloned to <rdar://problem/12581618>
Comment 3 Argyrios Kyrtzidis 2012-10-29 19:27:47 PDT
Fixed in r166987