From 5272664bcb8c85a81e9af8e61327797f3651c2c6 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 9 Jun 2014 11:05:35 -0400 Subject: [PATCH] Add missing set of braces, fixes --trace. Also ensure // commented Debug() lines don't get included in Debug/Trace_tags. --- src/options/Makefile.am | 2 +- src/options/base_options_handlers.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/options/Makefile.am b/src/options/Makefile.am index 18b2c42f4..018f66ca8 100644 --- a/src/options/Makefile.am +++ b/src/options/Makefile.am @@ -171,7 +171,7 @@ Debug_tags.tmp Trace_tags.tmp: $(AM_V_GEN)\ grep '\<$(@:_tags.tmp=)\(\.isOn\)* *( *\".*\" *)' \ `find @srcdir@/../ -name "*.cpp" -o -name "*.h" -o -name "*.cc" -o -name "*.g"` | \ - sed 's/^$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | LC_ALL=C sort | uniq >"$@" + sed 's/\/\/.*//;s/^$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | LC_ALL=C sort | uniq >"$@" MOSTLYCLEANFILES = \ Debug_tags \ diff --git a/src/options/base_options_handlers.h b/src/options/base_options_handlers.h index e701ee13d..dcf059234 100644 --- a/src/options/base_options_handlers.h +++ b/src/options/base_options_handlers.h @@ -120,7 +120,7 @@ inline std::string suggestTags(char const* const* validTags, std::string inputTa inline void addTraceTag(std::string option, std::string optarg, SmtEngine* smt) { if(Configuration::isTracingBuild()) { - if(!Configuration::isTraceTag(optarg.c_str())) + if(!Configuration::isTraceTag(optarg.c_str())) { if(optarg == "help") { printf("available tags:"); @@ -136,6 +136,7 @@ inline void addTraceTag(std::string option, std::string optarg, SmtEngine* smt) throw OptionException(std::string("trace tag ") + optarg + std::string(" not available.") + suggestTags(Configuration::getTraceTags(), optarg) ); + } } else { throw OptionException("trace tags not available in non-tracing builds"); } -- 2.30.2