Always initialize variable. If opening quote is the last character in comment, we will be using an uninitialized value. There is already a test for that in unittests/AST/CommentLexer.cpp, but it seems like we were lucky with the value that got loaded into the variable so the test passed.

llvm-svn: 160133
This commit is contained in:
Dmitri Gribenko 2012-07-12 16:34:32 +00:00
parent 8480d420d3
commit c06cbd14e3
1 changed files with 1 additions and 1 deletions

View File

@ -509,7 +509,7 @@ public:
} else
Error = true;
}
char C;
char C = '\0';
while (!Error && !isEnd()) {
C = peek();
WordText.push_back(C);