[cfe-commits] r57391 - in /cfe/trunk/lib: AST/DeclSerialization.cpp Lex/Lexer.cpp Sema/SemaDecl.cpp
Chris Lattner
sabre at nondot.org
Sat Oct 11 17:28:42 PDT 2008
Author: lattner
Date: Sat Oct 11 19:28:42 2008
New Revision: 57391
URL: http://llvm.org/viewvc/llvm-project?rev=57391&view=rev
Log:
silence some release-assert warnings.
Modified:
cfe/trunk/lib/AST/DeclSerialization.cpp
cfe/trunk/lib/Lex/Lexer.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/AST/DeclSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclSerialization.cpp?rev=57391&r1=57390&r2=57391&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclSerialization.cpp (original)
+++ cfe/trunk/lib/AST/DeclSerialization.cpp Sat Oct 11 19:28:42 2008
@@ -42,7 +42,6 @@
switch (k) {
default:
assert (false && "Not implemented.");
- break;
case TranslationUnit:
Dcl = TranslationUnitDecl::CreateImpl(D, C);
Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=57391&r1=57390&r2=57391&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Sat Oct 11 19:28:42 2008
@@ -105,8 +105,7 @@
/// 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) {
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=57391&r1=57390&r2=57391&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Oct 11 19:28:42 2008
@@ -2067,11 +2067,11 @@
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 @@
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;
More information about the cfe-commits
mailing list