r321396 - [ODRHash] Disable hashing on methods.

Richard Trieu via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 22 17:35:32 PST 2017

Author: rtrieu
Date: Fri Dec 22 17:35:32 2017
New Revision: 321396

URL: http://llvm.org/viewvc/llvm-project?rev=321396&view=rev
[ODRHash] Disable hashing on methods.

Turn off hashing for class methods, but leave it on for other functions.  This
should get the buildbot to green for the time being.


Modified: cfe/trunk/lib/AST/ODRHash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ODRHash.cpp?rev=321396&r1=321395&r2=321396&view=diff
--- cfe/trunk/lib/AST/ODRHash.cpp (original)
+++ cfe/trunk/lib/AST/ODRHash.cpp Fri Dec 22 17:35:32 2017
@@ -476,6 +476,9 @@ void ODRHash::AddFunctionDecl(const Func
   if (!Function->hasBody()) return;
   if (!Function->getBody()) return;
+  // TODO: Fix hashing for class methods.
+  if (isa<CXXMethodDecl>(Function)) return;
   // Skip functions that are specializations or in specialization context.
   const DeclContext *DC = Function;
   while (DC) {

More information about the cfe-commits mailing list