diff options
| author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2015-03-25 00:53:27 +0000 |
|---|---|---|
| committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2015-03-25 00:53:27 +0000 |
| commit | 93ed5cf5e62e828248ec80ba3a032df1d2159fdc (patch) | |
| tree | 11e764899f5471726487b27477e05f56fb75173b /clang/lib/Sema/DeclSpec.cpp | |
| parent | d811ffa5e6c0f30367b98a137298498bfc671bf2 (diff) | |
| download | bcm5719-llvm-93ed5cf5e62e828248ec80ba3a032df1d2159fdc.tar.gz bcm5719-llvm-93ed5cf5e62e828248ec80ba3a032df1d2159fdc.zip | |
Diagnose declspecs occuring after virt-specifier-seq and generate fixit hints
Summary: This fixes PR22075.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6828
llvm-svn: 233160
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
| -rw-r--r-- | clang/lib/Sema/DeclSpec.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index 5e349bc2ad2..f6689a96bdc 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -1220,7 +1220,10 @@ void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc, bool VirtSpecifiers::SetSpecifier(Specifier VS, SourceLocation Loc, const char *&PrevSpec) { + if (!FirstLocation.isValid()) + FirstLocation = Loc; LastLocation = Loc; + LastSpecifier = VS; if (Specifiers & VS) { PrevSpec = getSpecifierName(VS); |

