PR14695: Fix assert from bad cast<>. Not every namespace is a NamespaceDecl; it might instead be a TranslationUnitDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170976 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Check for the 'LIBCLANG_NOTHREADS' environment variable before creating
a separate thread for code-completion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170978 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Don't try to translate diagnostics from the precompiled preamble to the
code-completion results, the SourceManager state may be slightly
different when code-completing.

And we don't even care for diagnostics when code-completing, anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170979 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Fix crash when code-completing a macro invocation that
reached EOF and did not expand the argument into the source context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170980 91177308-0d34-0410-b5e6-96231b3b80d8
Clean out release notes for clang 3.3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170987 91177308-0d34-0410-b5e6-96231b3b80d8
Move a declaration closer to its use. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170992 91177308-0d34-0410-b5e6-96231b3b80d8
libFormat: Teach the *& usage heuristic that "return" starts a rhs too.

"return a*b;" was formatted as "return a *b;" and is now formatted as "return a * b;".

Fixes PR14687 partially.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170993 91177308-0d34-0410-b5e6-96231b3b80d8
docs: Convert ReleaseNotes to reST.

This is the last of the "regular" documents to convert to reST, and so
I'm declaring the initial clang reST conversion "done".

However,

- There are some documents in clang/www/ which probably should
  be migrated into clang/docs/, such as www/OpenProjects.html

  The primary thing blocking me from doing this right now is not knowing
  how to set up a redirect so that the old URL's continue to work.

- LibASTMatchersReference.html is not reST. This page is auto-generated
  by clang/docs/tools/dump_ast_matchers.py from the source and has some
  collapse/expand logic that isn't expressible directly with Sphinx, so
  just converting it to reST is not really a good strategy.

  Manuel Klimek and I discussed this and the general agreed-upon
  direction is making that page data-driven so that it, say, pulls in an
  auto-generated blob of JSON which describes the matchers and builds up
  the "matcher reference" part of the page with a small amount of JS.

- There are some rogue .txt files hanging around.

Also, I dropped the little dragon logo at the top because Sphinx was
warning about an external image reference (not sure why, but meh, I
didn't want to fight it). If anything, we would want such a logo
integrated into the site's overall theme, rather than hardcoded here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170994 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: add MemorySanitizer to the toctree


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171003 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: fix a syntax error: empty line required after code-block::


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171004 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: PTHInternals: use correct adornments and fix typos

Fixes PR14014


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171005 91177308-0d34-0410-b5e6-96231b3b80d8
Take operator precedence into account when splitting lines.

With this patch, splitting after binary operators has a panelty corresponding
to the operator's precedence. We used to ignore this and eagerly format like:

  if (aaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbbbbbbb &&
      ccccccccccccccccccccccccc) { .. }

With this patch, this becomes:

  if (aaaaaaaaaaaaaaaaaaaaaaaaa ||
      bbbbbbbbbbbbbbbbbbbbbbbbb && ccccccccccccccccccccccccc) { .. }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171007 91177308-0d34-0410-b5e6-96231b3b80d8
test/Index/preamble_macro_template.cpp: Tweak for win32.

Using the file immediately after "> file 2>&1" causes weird behavior on win32.
For example, "foo > %t 2>&1; FileCheck --input-file=%t"

Use "foo 2>&1 | tee %t" instead.

Note, mixing stdout and stderr to the same handle might cause unexpected behavior, due to buffering.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171009 91177308-0d34-0410-b5e6-96231b3b80d8
CGValue.h: Update one \param to Addr in MakeBitfield(). [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171011 91177308-0d34-0410-b5e6-96231b3b80d8
DiagnosticRenderer.cpp: Prune one description in DiagnosticRenderer::emitMacroExpansions(). [-Wdocumentation]

/// \param MacroSkipEnd The depth to stop skipping macro expansions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171012 91177308-0d34-0410-b5e6-96231b3b80d8
CGDecl.cpp: Prune three descriptions in two methods, CodeGenFunction::pushIrregularPartialArrayCleanup() and CodeGenFunction::pushRegularPartialArrayCleanup(). [-Wdocumentation]

/// \param array - a value of type elementType*
/// \param destructionKind - the kind of destruction required
/// \param initializedElementCount - a value of type size_t* holding the number of successfully-constructed elements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171013 91177308-0d34-0410-b5e6-96231b3b80d8
clang/AST/VTTBuilder.h: Prune one description in three methods, VTTBuilder::AddVTablePointer(), VTTBuilder::LayoutSecondaryVirtualPointers(), and VTTBuilder::LayoutSecondaryVirtualPointers(). [-Wdocumentation]

/// \param AddressPoints - If the vtable is a construction vtable, this has the address points for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171014 91177308-0d34-0410-b5e6-96231b3b80d8