Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: tools/clang/plugins/FindBadConstructsConsumer.cpp

Issue 1070353003: Revert of Build the Clang plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/plugins/ChromeClassTester.cpp ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "FindBadConstructsConsumer.h" 5 #include "FindBadConstructsConsumer.h"
6 6
7 #include "clang/Frontend/CompilerInstance.h" 7 #include "clang/Frontend/CompilerInstance.h"
8 #include "clang/AST/Attr.h" 8 #include "clang/AST/Attr.h"
9 #include "clang/Lex/Lexer.h" 9 #include "clang/Lex/Lexer.h"
10 #include "llvm/Support/raw_ostream.h" 10 #include "llvm/Support/raw_ostream.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 return PublicDestructor; 552 return PublicDestructor;
553 } 553 }
554 } 554 }
555 555
556 return None; 556 return None;
557 } 557 }
558 558
559 // Adds either a warning or error, based on the current handling of 559 // Adds either a warning or error, based on the current handling of
560 // -Werror. 560 // -Werror.
561 DiagnosticsEngine::Level FindBadConstructsConsumer::getErrorLevel() { 561 DiagnosticsEngine::Level FindBadConstructsConsumer::getErrorLevel() {
562 #if defined(LLVM_ON_WIN32)
563 // Only warn on Windows, since there are a lot of potential pre-existing
564 // issues.
565 return DiagnosticsEngine::Warning;
566 #else
567 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error 562 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error
568 : DiagnosticsEngine::Warning; 563 : DiagnosticsEngine::Warning;
569 #endif
570 } 564 }
571 565
572 // Returns true if |base| specifies one of the Chromium reference counted 566 // Returns true if |base| specifies one of the Chromium reference counted
573 // classes (base::RefCounted / base::RefCountedThreadSafe). 567 // classes (base::RefCounted / base::RefCountedThreadSafe).
574 bool FindBadConstructsConsumer::IsRefCountedCallback( 568 bool FindBadConstructsConsumer::IsRefCountedCallback(
575 const CXXBaseSpecifier* base, 569 const CXXBaseSpecifier* base,
576 CXXBasePath& path, 570 CXXBasePath& path,
577 void* user_data) { 571 void* user_data) {
578 FindBadConstructsConsumer* self = 572 FindBadConstructsConsumer* self =
579 static_cast<FindBadConstructsConsumer*>(user_data); 573 static_cast<FindBadConstructsConsumer*>(user_data);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 // one of those, it means there is at least one member after a factory. 787 // one of those, it means there is at least one member after a factory.
794 if (weak_ptr_factory_location.isValid() && 788 if (weak_ptr_factory_location.isValid() &&
795 !param_is_weak_ptr_factory_to_self) { 789 !param_is_weak_ptr_factory_to_self) {
796 diagnostic().Report(weak_ptr_factory_location, 790 diagnostic().Report(weak_ptr_factory_location,
797 diag_weak_ptr_factory_order_); 791 diag_weak_ptr_factory_order_);
798 } 792 }
799 } 793 }
800 } 794 }
801 795
802 } // namespace chrome_checker 796 } // namespace chrome_checker
OLDNEW
« no previous file with comments | « tools/clang/plugins/ChromeClassTester.cpp ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698