summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-10-21 13:37:27 +0000
committerSteve Naroff <snaroff@apple.com>2008-10-21 13:37:27 +0000
commite020fa1b854414c9622ed857a663091863a0cf11 (patch)
treedafce4829c034995228633d7bf8851ae5dfe0c48
parent56aa731a6300a99fb9f657b25c2a07c94c46f0a8 (diff)
downloadbcm5719-llvm-e020fa1b854414c9622ed857a663091863a0cf11.tar.gz
bcm5719-llvm-e020fa1b854414c9622ed857a663091863a0cf11.zip
Fix <rdar://problem/6297052> confused in some way by embedded /* */ comments.
llvm-svn: 57903
-rw-r--r--clang/Driver/RewriteObjC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp
index 18afbaa6853..14f6ade5916 100644
--- a/clang/Driver/RewriteObjC.cpp
+++ b/clang/Driver/RewriteObjC.cpp
@@ -595,8 +595,8 @@ void RewriteObjC::RewriteMethodDeclaration(ObjCMethodDecl *Method) {
SourceLocation LocEnd = Method->getLocEnd();
if (SM->getLineNumber(LocEnd) > SM->getLineNumber(LocStart)) {
- InsertText(LocStart, "/* ", 3);
- ReplaceText(LocEnd, 1, ";*/ ", 4);
+ InsertText(LocStart, "#if 0\n", 6);
+ ReplaceText(LocEnd, 1, ";\n#endif\n", 9);
} else {
InsertText(LocStart, "// ", 3);
}
OpenPOWER on IntegriCloud