[PATCH] Add new 'let' command to bind arbitrary values into constants.
Samuel Benzaquen
sbenza at google.com
Fri Apr 18 06:35:30 PDT 2014
================
Comment at: clang-query/Query.cpp:131
@@ +130,3 @@
+ } else {
+ QS.NamedValues.erase(Name);
+ }
----------------
Peter Collingbourne wrote:
> Sorry, one thing I forgot to mention before: is this the correct behavior if the value does not exist in the map? Should we be printing an error message in that case?
I don't know.
I would say it is not an error because the end state is the same as it would have been if it existed in the map.
================
Comment at: unittests/clang-query/QueryParserTest.cpp:123
@@ +122,3 @@
+ ASSERT_TRUE(isa<InvalidQuery>(Q));
+ EXPECT_EQ("expected variable name", cast<InvalidQuery>(Q)->ErrStr);
+}
----------------
Peter Collingbourne wrote:
> Please also test that extra stuff after the unlet query causes an error.
I'm sorry, but I don't know what extra stuff you are referring to.
http://reviews.llvm.org/D3383
More information about the cfe-commits
mailing list