summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/DeclSpec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-19 22:54:31 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-19 22:54:31 +0000
commitc4df407604b8798dfc56b2692d25b13a11fda0db (patch)
tree59242265f2be854097d23a39ccf0f62a83524eb7 /clang/lib/Parse/DeclSpec.cpp
parent8cccc542f643abcd73a44f9bdbb5ea11e970d883 (diff)
downloadbcm5719-llvm-c4df407604b8798dfc56b2692d25b13a11fda0db.tar.gz
bcm5719-llvm-c4df407604b8798dfc56b2692d25b13a11fda0db.zip
Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826
Diffstat (limited to 'clang/lib/Parse/DeclSpec.cpp')
-rw-r--r--clang/lib/Parse/DeclSpec.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/DeclSpec.cpp b/clang/lib/Parse/DeclSpec.cpp
index 11865ab97b8..5dc08b3dfa2 100644
--- a/clang/lib/Parse/DeclSpec.cpp
+++ b/clang/lib/Parse/DeclSpec.cpp
@@ -433,6 +433,7 @@ void DeclSpec::SaveWrittenBuiltinSpecs() {
void DeclSpec::Finish(Diagnostic &D, Preprocessor &PP) {
// Before possibly changing their values, save specs as written.
SaveWrittenBuiltinSpecs();
+ SaveStorageSpecifierAsWritten();
// Check the type specifier components first.
SourceManager &SrcMgr = PP.getSourceManager();
OpenPOWER on IntegriCloud