Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Sema/Spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ bool Sema::ApplySaveSpecification(SourceLocation Loc, SourceLocation IDLoc,

bool Sema::ApplySaveSpecification(SourceLocation Loc, SourceLocation IDLoc,
VarDecl *VD) {
if(VD->hasStorageSet()) {
if(VD->hasStorageSet() && IDLoc.isValid()) {
if(auto CBSet = dyn_cast<CommonBlockSet>(VD->getStorageSet())) {
Diags.Report(Loc, diag::err_spec_not_applicable_to_common_block)
<< "save" << getTokenRange(IDLoc);
Expand Down