TargetInfo no longer includes a reference to SourceManager.
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 444ea1c..98ede43 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -181,13 +181,17 @@
if (Literal.isFloat) {
Ty = Context.FloatTy;
- Context.Target.getFloatInfo(Size, Align, Format, Tok.getLocation());
+ Context.Target.getFloatInfo(Size, Align, Format,
+ Context.getFullLoc(Tok.getLocation()));
+
} else if (Literal.isLong) {
Ty = Context.LongDoubleTy;
- Context.Target.getLongDoubleInfo(Size, Align, Format, Tok.getLocation());
+ Context.Target.getLongDoubleInfo(Size, Align, Format,
+ Context.getFullLoc(Tok.getLocation()));
} else {
Ty = Context.DoubleTy;
- Context.Target.getDoubleInfo(Size, Align, Format, Tok.getLocation());
+ Context.Target.getDoubleInfo(Size, Align, Format,
+ Context.getFullLoc(Tok.getLocation()));
}
// isExact will be set by GetFloatValue().
@@ -207,7 +211,8 @@
Diag(Tok.getLocation(), diag::ext_longlong);
// Get the value in the widest-possible width.
- llvm::APInt ResultVal(Context.Target.getIntMaxTWidth(Tok.getLocation()), 0);
+ llvm::APInt ResultVal(Context.Target.getIntMaxTWidth(
+ Context.getFullLoc(Tok.getLocation())), 0);
if (Literal.GetIntegerValue(ResultVal)) {
// If this value didn't fit into uintmax_t, warn and force to ull.