aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-02-02 00:10:46 +0000
committerSteve Naroff <snaroff@apple.com>2008-02-02 00:10:46 +0000
commit49c1f4aa2a6c360d25d605004ec3c4affd62db77 (patch)
tree9095e713ae4f93ea9dbc93c99e191bec42162bff
parent27e2eb40b9adc876c05e0260d1100385c9f0e5f5 (diff)
Cleanup previous patch (based on feedback from Ted).
Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46654 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/SourceManager.h8
-rw-r--r--include/clang/Lex/HeaderSearch.h8
2 files changed, 9 insertions, 7 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 5e7cc75579..3555f05e32 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -222,14 +222,14 @@ class SourceManager {
/// MainFileID - The file ID for the main source file of the translation unit.
unsigned MainFileID;
-
+
+ // SourceManager doesn't support copy construction.
+ explicit SourceManager(const SourceManager&);
+ void operator=(const SourceManager&);
public:
SourceManager() : LastLineNoFileIDQuery(~0U), MainFileID(0) {}
~SourceManager() {}
- // SourceManager doesn't support copy construction.
- explicit SourceManager(const SourceManager&);
-
void clearIDTables() {
FileIDs.clear();
MacroIDs.clear();
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h
index 1532b0e287..a7f8a116fb 100644
--- a/include/clang/Lex/HeaderSearch.h
+++ b/include/clang/Lex/HeaderSearch.h
@@ -89,13 +89,15 @@ class HeaderSearch {
unsigned NumIncluded;
unsigned NumMultiIncludeFileOptzn;
unsigned NumFrameworkLookups, NumSubFrameworkLookups;
+
+ // HeaderSearch doesn't support default or copy construction.
+ explicit HeaderSearch();
+ explicit HeaderSearch(const HeaderSearch&);
+ void operator=(const HeaderSearch&);
public:
HeaderSearch(FileManager &FM);
~HeaderSearch();
- // HeaderSearch doesn't support copy construction.
- explicit HeaderSearch(const HeaderSearch&);
-
FileManager &getFileMgr() const { return FileMgr; }
/// SetSearchPaths - Interface for setting the file search paths.