aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AST/DeclSerialization.cpp1
-rw-r--r--lib/Lex/Lexer.cpp3
-rw-r--r--lib/Sema/SemaDecl.cpp14
3 files changed, 8 insertions, 10 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index 2ebcb76fbf..718885b2b5 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -42,7 +42,6 @@ Decl* Decl::Create(Deserializer& D, ASTContext& C) {
switch (k) {
default:
assert (false && "Not implemented.");
- break;
case TranslationUnit:
Dcl = TranslationUnitDecl::CreateImpl(D, C);
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 8acfe2aef6..c99dc1d4b8 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -105,8 +105,7 @@ Lexer::Lexer(SourceLocation fileloc, Preprocessor &pp,
/// Lexer constructor - Create a new raw lexer object. This object is only
/// suitable for calls to 'LexRawToken'. This lexer assumes that the
-/// associated file buffer will outlive it, so it doesn't take ownership of
-/// either of them.
+/// associated file buffer will outlive it, so it doesn't take ownership of it.
Lexer::Lexer(SourceLocation fileloc, const LangOptions &features,
const char *BufStart, const char *BufEnd)
: FileLoc(fileloc), PP(0), Features(features) {
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 1b6ff878f5..6ee4ae17ec 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2067,11 +2067,11 @@ Sema::DeclTy *Sema::ActOnField(Scope *S,
static ObjCIvarDecl::AccessControl
TranslateIvarVisibility(tok::ObjCKeywordKind ivarVisibility) {
switch (ivarVisibility) {
- case tok::objc_private: return ObjCIvarDecl::Private;
- case tok::objc_public: return ObjCIvarDecl::Public;
- case tok::objc_protected: return ObjCIvarDecl::Protected;
- case tok::objc_package: return ObjCIvarDecl::Package;
- default: assert(false && "Unknown visitibility kind");
+ default: assert(0 && "Unknown visitibility kind");
+ case tok::objc_private: return ObjCIvarDecl::Private;
+ case tok::objc_public: return ObjCIvarDecl::Public;
+ case tok::objc_protected: return ObjCIvarDecl::Protected;
+ case tok::objc_package: return ObjCIvarDecl::Package;
}
}
@@ -2249,8 +2249,8 @@ void Sema::ActOnFields(Scope* S,
Diag(FD->getLocation(), diag::err_duplicate_member, II->getName());
// Find the previous decl.
SourceLocation PrevLoc;
- for (unsigned i = 0, e = RecFields.size(); ; ++i) {
- assert(i != e && "Didn't find previous def!");
+ for (unsigned i = 0; ; ++i) {
+ assert(i != RecFields.size() && "Didn't find previous def!");
if (RecFields[i]->getIdentifier() == II) {
PrevLoc = RecFields[i]->getLocation();
break;