summaryrefslogtreecommitdiffstats
path: root/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-24 20:33:05 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-24 20:33:05 +0000
commitc4b5582908e743cc05782e5220546f27286be19b (patch)
tree0996a4bb25ba07563a6b81fa1135132acefbfdad /lib/Lex/TokenLexer.cpp
parent14924267950e75c6c1f6fcea39fa507b7168bc39 (diff)
Silence 'may be used uninitialized' warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r--lib/Lex/TokenLexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 80f6ad1449..a651f6c91a 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -698,7 +698,7 @@ static void updateConsecutiveMacroArgTokens(SourceManager &SM,
// For the consecutive tokens, find the length of the SLocEntry to contain
// all of them.
Token &LastConsecutiveTok = *(NextTok-1);
- int LastRelOffs;
+ int LastRelOffs = 0;
SM.isInSameSLocAddrSpace(FirstLoc, LastConsecutiveTok.getLocation(),
&LastRelOffs);
unsigned FullLength = LastRelOffs + LastConsecutiveTok.getLength();
@@ -711,7 +711,7 @@ static void updateConsecutiveMacroArgTokens(SourceManager &SM,
// expanded location.
for (; begin_tokens < NextTok; ++begin_tokens) {
Token &Tok = *begin_tokens;
- int RelOffs;
+ int RelOffs = 0;
SM.isInSameSLocAddrSpace(FirstLoc, Tok.getLocation(), &RelOffs);
Tok.setLocation(Expansion.getFileLocWithOffset(RelOffs));
}