[PATCH] D14480: Improve running time of getAsmSrcLocInfo
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 18:17:04 PST 2015
rsmith added inline comments.
================
Comment at: include/clang/AST/Expr.h:1613-1617
@@ -1612,4 +1612,7 @@
SourceLocation getLocationOfByte(unsigned ByteNo, const SourceManager &SM,
const LangOptions &Features,
- const TargetInfo &Target) const;
+ const TargetInfo &Target,
+ unsigned * StartToken=nullptr,
+ unsigned * ByteOffset=nullptr
+ ) const;
typedef const SourceLocation *tokloc_iterator;
----------------
Please run this through clang-format.
================
Comment at: lib/AST/Expr.cpp:1009
@@ -1009,2 +1009,2 @@
///
SourceLocation StringLiteral::
----------------
Please update the doc comment to explain what the new parameters do and how they should be used.
================
Comment at: lib/AST/Expr.cpp:1013
@@ -1013,1 +1012,3 @@
+ const LangOptions &Features, const TargetInfo &Target,
+ unsigned * StartToken, unsigned * ByteOffset) const {
assert((Kind == StringLiteral::Ascii || Kind == StringLiteral::UTF8) &&
----------------
`StartTokenByteOffset` or `ByteOffsetOfStartToken` would be more obvious names here.
http://reviews.llvm.org/D14480
More information about the llvm-commits
mailing list