diff options
author | Jay Foad <jay.foad@gmail.com> | 2009-05-21 09:52:38 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2009-05-21 09:52:38 +0000 |
commit | 7d0479f2c2d60ccff381ce63105168bd132fb304 (patch) | |
tree | 417d43f95d605528391e6ab8c9a460f9b6347b83 /clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | 9fc7856e3b6f549030863bf35441b456a0affec7 (diff) | |
download | bcm5719-llvm-7d0479f2c2d60ccff381ce63105168bd132fb304.tar.gz bcm5719-llvm-7d0479f2c2d60ccff381ce63105168bd132fb304.zip |
Use v.data() instead of &v[0] when SmallVector v might be empty.
llvm-svn: 72210
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index d88e57d85df..e79453c28c8 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -68,7 +68,7 @@ static void PrintMacroDefinition(const IdentifierInfo &II, const MacroInfo &MI, // Make sure we have enough space in the spelling buffer. if (I->getLength() < SpellingBuffer.size()) SpellingBuffer.resize(I->getLength()); - const char *Buffer = &SpellingBuffer[0]; + const char *Buffer = SpellingBuffer.data(); unsigned SpellingLen = PP.getSpelling(*I, Buffer); OS.write(Buffer, SpellingLen); } |