diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Decl.h | 16 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 31cee24df9..686ff23062 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -2519,11 +2519,21 @@ private: class FileScopeAsmDecl : public Decl { StringLiteral *AsmString; - FileScopeAsmDecl(DeclContext *DC, SourceLocation L, StringLiteral *asmstring) - : Decl(FileScopeAsm, DC, L), AsmString(asmstring) {} + SourceLocation RParenLoc; + FileScopeAsmDecl(DeclContext *DC, StringLiteral *asmstring, + SourceLocation StartL, SourceLocation EndL) + : Decl(FileScopeAsm, DC, StartL), AsmString(asmstring), RParenLoc(EndL) {} public: static FileScopeAsmDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, StringLiteral *Str); + StringLiteral *Str, SourceLocation AsmLoc, + SourceLocation RParenLoc); + + SourceLocation getAsmLoc() const { return getLocation(); } + SourceLocation getRParenLoc() const { return RParenLoc; } + void setRParenLoc(SourceLocation L) { RParenLoc = L; } + SourceRange getSourceRange() const { + return SourceRange(getAsmLoc(), getRParenLoc()); + } const StringLiteral *getAsmString() const { return AsmString; } StringLiteral *getAsmString() { return AsmString; } diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 579da8b177..26b3d96ff9 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -891,7 +891,9 @@ public: NamedDecl *D); void DiagnoseInvalidJumps(Stmt *Body); - Decl *ActOnFileScopeAsmDecl(SourceLocation Loc, Expr *expr); + Decl *ActOnFileScopeAsmDecl(Expr *expr, + SourceLocation AsmLoc, + SourceLocation RParenLoc); /// Scope actions. void ActOnPopScope(SourceLocation Loc, Scope *S); |