[cfe-commits] r46653 - in /cfe/trunk/include/clang: Basic/SourceManager.h Lex/HeaderSearch.h
Steve Naroff
snaroff at apple.com
Fri Feb 1 15:31:13 PST 2008
Author: snaroff
Date: Fri Feb 1 17:31:13 2008
New Revision: 46653
URL: http://llvm.org/viewvc/llvm-project?rev=46653&view=rev
Log:
Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).
I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/include/clang/Lex/HeaderSearch.h
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=46653&r1=46652&r2=46653&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Fri Feb 1 17:31:13 2008
@@ -227,6 +227,9 @@
SourceManager() : LastLineNoFileIDQuery(~0U), MainFileID(0) {}
~SourceManager() {}
+ // SourceManager doesn't support copy construction.
+ explicit SourceManager(const SourceManager&);
+
void clearIDTables() {
FileIDs.clear();
MacroIDs.clear();
Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=46653&r1=46652&r2=46653&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
+++ cfe/trunk/include/clang/Lex/HeaderSearch.h Fri Feb 1 17:31:13 2008
@@ -93,6 +93,9 @@
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.
More information about the cfe-commits
mailing list