[clang-tools-extra] r222305 - Remove uses of StringMap::GetOrCreateValue in favor of stl-compatible API usage

David Blaikie dblaikie at gmail.com
Tue Nov 18 19:05:07 PST 2014


Author: dblaikie
Date: Tue Nov 18 21:05:07 2014
New Revision: 222305

URL: http://llvm.org/viewvc/llvm-project?rev=222305&view=rev
Log:
Remove uses of StringMap::GetOrCreateValue in favor of stl-compatible API usage

Modified:
    clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp

Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp?rev=222305&r1=222304&r2=222305&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp Tue Nov 18 21:05:07 2014
@@ -190,10 +190,10 @@ const ClangTidyOptions &FileOptionsProvi
       while (Path != CurrentPath) {
         DEBUG(llvm::dbgs() << "Caching configuration for path " << Path
                            << ".\n");
-        CachedOptions.GetOrCreateValue(Path, *Result);
+        CachedOptions[Path] = *Result;
         Path = llvm::sys::path::parent_path(Path);
       }
-      return CachedOptions.GetOrCreateValue(Path, *Result).getValue();
+      return CachedOptions[Path] = *Result;
     }
   }
 }





More information about the cfe-commits mailing list