================
@@ -21,17 +21,6 @@ using namespace clang;
 namespace {
 
 class TemplateArgumentHasher {
-  // If we bail out during the process of calculating hash values for
-  // template arguments for any reason. We're allowed to do it since
-  // TemplateArgumentHasher are only required to give the same hash value
-  // for the same template arguments, but not required to give different
-  // hash value for different template arguments.
-  //
-  // So in the worst case, it is still a valid implementation to give all
-  // inputs the same BailedOutValue as output.
-  bool BailedOut = false;
-  static constexpr unsigned BailedOutValue = 0x12345678;
----------------
hahnjo wrote:

Sure, the hasher must skip all inputs that could differ in their literal 
spelling, but I don't see why we have to hash them to a single global value. If 
two semantically same Decls / Types are not literally the same, we skip the 
input for both of them and the output hash will still be the same.

Do you have a concrete example in mind that you think should be tested?

https://github.com/llvm/llvm-project/pull/133057
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to