summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2009-05-21 09:52:38 +0000
committerJay Foad <jay.foad@gmail.com>2009-05-21 09:52:38 +0000
commit7d0479f2c2d60ccff381ce63105168bd132fb304 (patch)
tree417d43f95d605528391e6ab8c9a460f9b6347b83 /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parent9fc7856e3b6f549030863bf35441b456a0affec7 (diff)
downloadbcm5719-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.cpp2
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);
}
OpenPOWER on IntegriCloud