diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-26 06:49:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-26 06:49:43 +0000 |
commit | 985abd958d83e4f109a15451440f1d008ae45f59 (patch) | |
tree | c27633fe0835f44b2ce51e81a8f7621e2c9cc42f /lib/Parse/Parser.cpp | |
parent | d546fc5f2072d93bb475fdd76cd7b629a08ad93b (diff) |
Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs. Propagate around 'const'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 8ff7e9f186..281459a300 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -473,7 +473,7 @@ Parser::DeclTy *Parser::ParseFunctionDefinition(Declarator &D) { // declaration-specifiers are completely optional in the grammar. if (getLang().ImplicitInt && D.getDeclSpec().getParsedSpecifiers() == 0) { const char *PrevSpec; - D.getDeclSpec().SetTypeSpecType(DeclSpec::TST_int, D.getIdentifierLoc(), + D.getMutableDeclSpec().SetTypeSpecType(DeclSpec::TST_int, D.getIdentifierLoc(), PrevSpec); } |