]> granicus.if.org Git - clang/commitdiff
Added error message for unrecognized options.
authorTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 16:35:01 +0000 (16:35 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 16:35:01 +0000 (16:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49092 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index 5600b052cbeb183163c4c822884580ebccdb9176..b3cb9325e87dfa6a40dfcf5bd853718d4a68a4cd 100755 (executable)
@@ -239,7 +239,7 @@ while (@ARGV) {
     shift @ARGV;
         
     if (!@ARGV) {
-      die "'-o' option requires a target directory name.";
+      die "$Prog: '-o' option requires a target directory name.\n";
     }
     
     $HtmlDir = shift @ARGV;
@@ -258,6 +258,8 @@ while (@ARGV) {
     next;
   }
   
+  die "$Prog: unrecognized option '$arg'\n" if ($arg =~ /^-/);
+  
   last;
 }